import request from "@/utils/request.js";
// 退出登录
export function logout(data) {
  return request({
    url: "/api/logout",
    method: "post",
    data,
  });
}

//注册
export function register(data) {
  return request({
    url: "/api/register",
    method: "post",
    data,
  });
}

//获取验证码
// 发送验证码
export function sendCode(email, username) {
  return request({
    url: "/api/verification",
    method: "get",
    params: {
      email, username
    }
  });
}